<?php
namespace TaoJiang\Teacher\Domain\Model;

/***************************************************************
 *
 *  Copyright notice
 *
 *  (c) 2017
 *
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
 *  free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  The GNU General Public License can be found at
 *  http://www.gnu.org/copyleft/gpl.html.
 *
 *  This script is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/

/**
 * Teacher
 */
class Teacher extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{

    /**
     * 姓名
     * 
     * @var string
     */
    protected $name = '';
    
    /**
     * 在职
     * 
     * @var bool
     */
    protected $iswork = false;
    
    /**
     * 职位
     * 
     * @var string
     */
    protected $position = '';
    
    /**
     * 照片
     * 
     * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
     */
    protected $profile = null;
    
    /**
     * 简介
     * 
     * @var string
     */
    protected $short = '';
    
    /**
     * 联系方式
     * 
     * @var string
     */
    protected $contact = '';
    
    /**
     * 专著
     * 
     * @var string
     */
    protected $works = '';
    
    /**
     * 学术论文
     * 
     * @var string
     */
    protected $paper = '';
    
    /**
     * 专业领域
     * 
     * @var string
     */
    protected $profession = '';
    
    /**
     * 担任课程
     * 
     * @var string
     */
    protected $course = '';
    
    /**
     * 科研项目
     * 
     * @var string
     */
    protected $projects = '';
    
    /**
     * 获得奖项
     * 
     * @var string
     */
    protected $reward = '';
    
    /**
     * 推荐到首页
     * 
     * @var bool
     */
    protected $tohome = false;
    
    /**
     * department
     * 
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TaoJiang\Teacher\Domain\Model\Department>
     */
    protected $department = null;
    
    /**
     * Returns the iswork
     * 
     * @return bool $iswork
     */
    public function getIswork()
    {
        return $this->iswork;
    }
    
    /**
     * Sets the iswork
     * 
     * @param bool $iswork
     * @return void
     */
    public function setIswork($iswork)
    {
        $this->iswork = $iswork;
    }
    
    /**
     * Returns the boolean state of iswork
     * 
     * @return bool
     */
    public function isIswork()
    {
        return $this->iswork;
    }
    
    /**
     * Returns the name
     * 
     * @return string $name
     */
    public function getName()
    {
        return $this->name;
    }
    
    /**
     * Sets the name
     * 
     * @param string $name
     * @return void
     */
    public function setName($name)
    {
        $this->name = $name;
    }
    
    /**
     * Returns the position
     * 
     * @return string $position
     */
    public function getPosition()
    {
        return $this->position;
    }
    
    /**
     * Sets the position
     * 
     * @param string $position
     * @return void
     */
    public function setPosition($position)
    {
        $this->position = $position;
    }
    
    /**
     * Returns the profile
     * 
     * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $profile
     */
    public function getProfile()
    {
        return $this->profile;
    }
    
    /**
     * Sets the profile
     * 
     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $profile
     * @return void
     */
    public function setProfile(\TYPO3\CMS\Extbase\Domain\Model\FileReference $profile)
    {
        $this->profile = $profile;
    }
    
    /**
     * Returns the short
     * 
     * @return string $short
     */
    public function getShort()
    {
        return $this->short;
    }
    
    /**
     * Sets the short
     * 
     * @param string $short
     * @return void
     */
    public function setShort($short)
    {
        $this->short = $short;
    }
    
    /**
     * Returns the contact
     * 
     * @return string $contact
     */
    public function getContact()
    {
        return $this->contact;
    }
    
    /**
     * Sets the contact
     * 
     * @param string $contact
     * @return void
     */
    public function setContact($contact)
    {
        $this->contact = $contact;
    }
    
    /**
     * Returns the works
     * 
     * @return string $works
     */
    public function getWorks()
    {
        return $this->works;
    }
    
    /**
     * Sets the works
     * 
     * @param string $works
     * @return void
     */
    public function setWorks($works)
    {
        $this->works = $works;
    }
    
    /**
     * Returns the paper
     * 
     * @return string $paper
     */
    public function getPaper()
    {
        return $this->paper;
    }
    
    /**
     * Sets the paper
     * 
     * @param string $paper
     * @return void
     */
    public function setPaper($paper)
    {
        $this->paper = $paper;
    }
    
    /**
     * Returns the profession
     * 
     * @return string $profession
     */
    public function getProfession()
    {
        return $this->profession;
    }
    
    /**
     * Sets the profession
     * 
     * @param string $profession
     * @return void
     */
    public function setProfession($profession)
    {
        $this->profession = $profession;
    }
    
    /**
     * Returns the course
     * 
     * @return string $course
     */
    public function getCourse()
    {
        return $this->course;
    }
    
    /**
     * Sets the course
     * 
     * @param string $course
     * @return void
     */
    public function setCourse($course)
    {
        $this->course = $course;
    }
    
    /**
     * Returns the projects
     * 
     * @return string $projects
     */
    public function getProjects()
    {
        return $this->projects;
    }
    
    /**
     * Sets the projects
     * 
     * @param string $projects
     * @return void
     */
    public function setProjects($projects)
    {
        $this->projects = $projects;
    }
    
    /**
     * Returns the reward
     * 
     * @return string $reward
     */
    public function getReward()
    {
        return $this->reward;
    }
    
    /**
     * Sets the reward
     * 
     * @param string $reward
     * @return void
     */
    public function setReward($reward)
    {
        $this->reward = $reward;
    }
    
    /**
     * __construct
     */
    public function __construct()
    {
        //Do not remove the next line: It would break the functionality
        $this->initStorageObjects();
    }
    
    /**
     * Initializes all ObjectStorage properties
     * Do not modify this method!
     * It will be rewritten on each save in the extension builder
     * You may modify the constructor of this class instead
     * 
     * @return void
     */
    protected function initStorageObjects()
    {
        $this->department = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
    }
    
    /**
     * Returns the tohome
     * 
     * @return bool $tohome
     */
    public function getTohome()
    {
        return $this->tohome;
    }
    
    /**
     * Sets the tohome
     * 
     * @param bool $tohome
     * @return void
     */
    public function setTohome($tohome)
    {
        $this->tohome = $tohome;
    }
    
    /**
     * Returns the boolean state of tohome
     * 
     * @return bool
     */
    public function isTohome()
    {
        return $this->tohome;
    }
    
    /**
     * Adds a Department
     * 
     * @param \TaoJiang\Teacher\Domain\Model\Department $department
     * @return void
     */
    public function addDepartment(\TaoJiang\Teacher\Domain\Model\Department $department)
    {
        $this->department->attach($department);
    }
    
    /**
     * Removes a Department
     * 
     * @param \TaoJiang\Teacher\Domain\Model\Department $departmentToRemove The Department to be removed
     * @return void
     */
    public function removeDepartment(\TaoJiang\Teacher\Domain\Model\Department $departmentToRemove)
    {
        $this->department->detach($departmentToRemove);
    }
    
    /**
     * Returns the department
     * 
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TaoJiang\Teacher\Domain\Model\Department> $department
     */
    public function getDepartment()
    {
        return $this->department;
    }
    
    /**
     * Sets the department
     * 
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TaoJiang\Teacher\Domain\Model\Department> $department
     * @return void
     */
    public function setDepartment(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $department)
    {
        $this->department = $department;
    }

}